package editor.cn;

//Implement function ToLowerCase() that has a string parameter str, and returns 
//the same string in lowercase. 
//
// 
//
// 
// Example 1: 
//
// 
//Input: "Hello"
//Output: "hello"
// 
//
// 
// Example 2: 
//
// 
//Input: "here"
//Output: "here"
// 
//
// 
// Example 3: 
//
// 
//Input: "LOVELY"
//Output: "lovely"
// 
// 
// 
// Related Topics 字符串 
// 👍 139 👎 0

public class ToLowerCase{
    public static void main(String[] args) {
        Solution solution = new ToLowerCase().new Solution();
        String myName = solution.toLowerCase("MYName");
        System.out.println(myName);
    }

//leetcode submit region begin(Prohibit modification and deletion)
class Solution {
    public String toLowerCase(String str) {
        char[] chars = str.toCharArray();
        for (int i = 0; i < chars.length; i++) {
            chars[i] = (char) (chars[i] | 32);
        }
        return new String(chars);

    }
}
//leetcode submit region end(Prohibit modification and deletion)

}